Hybris UX Api
TMF667 - Post document
This operation allows you to create a QR Code.
URL
http://[localhost]:[port]/ecom-ux/v1/{businessId}/documentURL PARAMS
| name | type | description | required |
|---|---|---|---|
| businessId | String | 2 letter ISO 3166 country code (PA) identifying the business unit. | Y |
Headers
| name | type | description | required |
|---|---|---|---|
| client-id | String | The client-id identifying the channel. | Y |
| client-secret | String | Password associated with the client-id. | Y |
| client_id | String | The client_id identifying the channel. | Y (LC cloudhub) |
| client_secret | String | Password associated with the client_id. | Y (LC cloudhub) |
| X-Correlation-ID | String | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y for business |
Data Model - Request
| field name | type | description | required (mandatory-Y, optional-N |
|---|---|---|---|
| name | String | name for the QR code image to saved in emarsys | Y (PA, LC) |
| documentType | String | Type of the documentType | N (PA, LC) |
| characteristic[] | Array | Y (PA, LC) | |
| characteristic[].valueType | String | valuetype for the characteristic field | Y (PA, LC) |
| characteristic[].value | String | value for the characteristic field | Y(PA, LC) |
| characteristic[].name | String | Name for the characteristic field | Y(PA, LC) |
Data Model - Response
| field name | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
|---|---|---|---|
| id | string | unique identifier | N (PA), N/A(LC) |
| name | string | A string used to give a name to the document. | N (PA, LC) |
| documentType | string | Name of the document type | N (PA, LC) |
| status | string | A document status type (DocumentStatusType). The life cycle state of the document. | N (PA), N/A(LC) |
| characteristic | array | A list of characteristics (Characteristic [*]). Describes a given characteristic of an object or entity through a name/value pair. | N (PA), Y(LC) |
| characteristic.name | string | Name of the characteristic | N (PA), Y(LC) |
| characteristic.valueType | string | Data type of the value of the characteristic. | N (PA, LC) |
| characteristic.value | any | The value of the characteristic. | N (PA), Y(LC) |
| attachment | array | A list of attachment ref or values (AttachmentRefOrValue [*]). An attachment by value or by reference. An attachment complements the description of an element, for example a picture. | N (PA), N/A(LC) |
| attachment.id | string | Unique identifier for this particular attachment. | N (PA), N/A(LC) |
| attachment.attachmentType | string | Attachment type such as picture. | N (PA), N/A(LC) |
| attachment.mimeType | string | Attachment mime type such as extension file for picture. | N (PA), N/A(LC) |
| attachment.name | string | The name of the attachment. | N (PA), N/A(LC) |
| attachment.size | object | The size of the attachment. | N (PA), N/A(LC) |
| attachment.size.amount | float | Numeric value in a given unit. | N (PA), N/A(LC) |
| attachment.size.unit | string | Units | N (PA), N/A(LC) |
| attachment.url | string | Remote reference to the content if web-addressable. | N (PA), N/A(LC) |
characteristics - sub-resource
| field name | valueType | description | required(mandatory-Y, optional-N, Not applicable- N/A) | examples |
|---|---|---|---|---|
| characteristic[].name=="folderId" | integer | Customer address id | PA (Y for generating QRcode URL N/A for generating base64 format QRcode), N/A(LC) | { "name": "folderId", "valueType": "integer", "value": TBD } |
| characteristic[].name=="height" | integer | Customer contact id | PA( Y for generating QRcode URL N/A for generating base64 format QRcode), N/A(LC) | { "name": "height", "valueType": "integer", "value": 300 } |
| characteristic[].name=="width" | integer | business unit | PA( Y for generating QRcode URL N/A for generating base64 format QRcode), N/A(LC) | { "name": "width", "valueType": "integer", "value": 300 } |
| characteristic[].name=="activationCode" | String | Customer location id | PA(Y for both), Y(LC) | { "name": "activationCode", "valueType": "integer", "value": "LPA:1$sm-v4-099-a-gtm.pr.go-esim.com$0D7DBE1E622DD42E26A11DD09A04FE50" } |
Key considerations
For sample examples please refer the following URL - ECOM-UX Post Document
PA Implementation:
-API will support two ways to generate QRcode image:
1.generating the base64 content for the QRcode image.
- name will be static value. we can pass "eSIM".
- In the characteristic array, only pass the object with characteristic.name = "activationCode" as defined in the sub-resource data model. This value will be used to generate the QR code.
- please refer to below sample examples from specification url:
resquest - "PA_QRcode-Base64_request"in API specification
response - "PA_QRcode-Base64_response" in API specification
2.generating the URL of the QRcode via storing emarsys.
- The name field should specify the name of the QR code image to be stored in Emarsys. It must include a valid image file extension (e.g., "PA_esim_123123.jpg").
- In the characteristic array, include the following objects as defined in the sub-resource data model:
- characteristic.name = "activationCode" – to generate the QR code content
- characteristic.name = "height" – to define the image height
- characteristic.name = "width" – to define the image width
- characteristic.name = "folderId" – to indicate the folder name where the image should be stored in Emarsys
-please refer to below sample examples from specification url:
request - "PA_QRcode-URL_request"in API specification
response - "PA_QRcode-URL_response" in API specificationLiberty Caribbean Implementation (LC SuperApp):
1. This usecase is implemented to generate QRcode image.
2. This is implemented for Jamaica (JM) market.
3. In the request payload, "name" will be static value should be sent as "eSIM".
4. In the request payload, when characteristic.name = "activationCode", characteristic[].value will be used to generate the QR code.
5. In the response payload, when characteristic[].name= "qrCode", characteristic[].value will be retrieved in base64 format (This content should be converted to qrcode image).
6. Please refer below sample examples from the below URL:
request - "LC_QRcode-Base64_request" in API specification
response - "LC_QRcode-Base64_response" in API specificationFor sample examples please refer the following URL - ECOM-UX Post Document